#ifndef FISHBOT_SENSOR_MONITOR__SENSOR_MONITOR_NODE_HPP_
#define FISHBOT_SENSOR_MONITOR__SENSOR_MONITOR_NODE_HPP_

#include "rclcpp/rclcpp.hpp"
#include "sensor_msgs/msg/laser_scan.hpp"
#include "sensor_msgs/msg/imu.hpp"
#include "sensor_msgs/msg/image.hpp"
#include "image_transport/image_transport.hpp"
#include "cv_bridge/cv_bridge.h"
#include "opencv2/opencv.hpp"

namespace fishbot_sensor_monitor
{
class SensorMonitorNode : public rclcpp::Node
{
public:
  // 构造函数：保持不变（后续在源文件中修复ImageTransport构造）
  SensorMonitorNode(const std::string & node_name = "sensor_monitor_node");

private:
  // 1. 修复相机回调函数参数：改为 ConstSharedPtr（image_transport要求）
  void laser_callback(const sensor_msgs::msg::LaserScan::SharedPtr msg);
  void imu_callback(const sensor_msgs::msg::Imu::SharedPtr msg);
  void camera_callback(const sensor_msgs::msg::Image::ConstSharedPtr msg);  // 关键修改：ConstSharedPtr

  // 2. 订阅者声明：保持不变
  rclcpp::Subscription<sensor_msgs::msg::LaserScan>::SharedPtr laser_sub_;
  rclcpp::Subscription<sensor_msgs::msg::Imu>::SharedPtr imu_sub_;
  image_transport::Subscriber camera_sub_;

  std::string camera_window_name_ = "FishBot Camera View";
};

}  // namespace fishbot_sensor_monitor

#endif  // FISHBOT_SENSOR_MONITOR__SENSOR_MONITOR_NODE_HPP_